<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:set value="recruit" var="moduleName" scope="request" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>用户列表</title>
	</head>
	<body>
		<table class="table-tab">
			<tr>
				<td class="td-tab cur-tab">
					<a href="<c:url value="/console/recruit/recruitUserEx.do?method=list" />">用户管理</a>
				</td>
				<td class="td-tab">
					<a href="<c:url value="/console/recruit/rmProvinceEx.do?method=list" />">区域划分</a>
				</td>
				<td class="td-tab-blank"></td>
			</tr>
		</table>
		<div class="div-content">
			<form action="<c:url value='/console/recruit/recruitUserEx.do'/>" method="post">
				<table class="table-layout">
					<tr class="tr-odd">
						<td class="td-label">
							登陆名

						</td>
						<td>
							<input type="text" name="filter_LIKES_loginName" value="<c:out value="${filters.LIKES_loginName}" />" />
						</td>
					</tr>
					<tr class="tr-even">
						<td class="td-label">
							昵称
						</td>
						<td>
							<input type="text" name="filter_LIKES_otherName" value="<c:out value="${filters.LIKES_otherName}" />" />
						</td>
					</tr>
					<tr class="tr-odd">
						<td class="td-label">
							角色
						</td>
						<td>
							<input type="hidden" id="filter_EQS_LuserRoleRels_role_id" name="filter_EQS_LuserRoleRels_role_id" value="<c:out value="${filters.EQS_LuserRoleRels_role_id}" />" />
							<select id="select_EQS_LuserRoleRels_role_id">
								<option value="">
									请选择
								</option>
								<logic-el:iterate name="allRoles" id="role" indexId="index">
									<c:if test="${role.status == '1'}">
										<option value="<c:out value="${role.id}" />">
											<c:out value="${role.title}" />
										</option>
									</c:if>
								</logic-el:iterate>
							</select>
						</td>
					</tr>
				</table>
				<div class="right-opertion">
					<input type="button" value="搜索" onclick="search(this);" class="button" />
				</div>
				<br />
				<table class="table-layout">
					<tr class="tr-thead">
						<th>
							序号
						</th>
						<th>
							<a href="javascript:void(0);" onclick="javascript:sort('loginName',this)">登陆名</a>
						</th>
						<th>
							<a href="javascript:void(0);" onclick="javascript:sort('otherName',this)">昵称</a>
						</th>
						<th>
							角色
						</th>
						<authz:authorize ifAnyGranted="admin,role_recruit_admin">
							<th>
								操作
							</th>
						</authz:authorize>
					</tr>
					<logic:present name="page">
						<logic-el:iterate name="page" property="result" id="user" indexId="index">
							<tr class="<c:if test="${index % 2 == 0}">tr-odd</c:if><c:if test="${index % 2 == 1}">tr-even</c:if>">
								<td>
									<c:out value="${index+1}" />
									&nbsp;
								</td>
								<td>
									<a href="<c:url value='recruitUserEx.do?method=view&id=${user.id}'/>"><c:out value="${user.loginName}" /></a> &nbsp;
								</td>
								<td>
									<c:out value="${user.otherName}" />
									&nbsp;
								</td>
								<td>
									<logic:iterate id="ur" name="user" property="userRoleRels">
										<c:if test="${ur.role != null && ur.status == '1' && ur.role.status == '1'}">
											<c:out value="${ur.role.title}" />&nbsp;&nbsp;
								</c:if>
									</logic:iterate>
								</td>
								<authz:authorize ifAnyGranted="admin,role_recruit_admin">
									<td>
										<a href="<c:url value='recruitUserEx.do?method=edit&id=${user.id}'/>">修改</a>&nbsp; <span class="link" onclick="if(confirm('确定要删除该记录吗？')) location.href='<c:url value='recruitUserEx.do?method=erase&id=${user.id}'/>'">删除</span>&nbsp;
									</td>
								</authz:authorize>
							</tr>
						</logic-el:iterate>
					</logic:present>
				</table>
				<page:page name="page" />
			</form>
			<authz:authorize ifAnyGranted="admin,role_recruit_admin">
				<br />
				<div class="center-opertion">
					<input type="button" onclick="location.href='<c:url value='recruitUserEx.do?method=edit'/>'" value="添加" />
					&nbsp;&nbsp;
				</div>
			</authz:authorize>
		</div>
		<script type="text/javascript">
bindSelect("select_EQS_LuserRoleRels_role_id","filter_EQS_LuserRoleRels_role_id");
	</script>
	</body>
</html>
